/** for Serializable */
import java.io.Serializable;

/**
 * This is a class to handle player
 * @author Code Traders
 * @version 1.0
 */
public class Player implements Serializable {
	
	/**
	 * serialVersionUID for the Player class
	 */
	private static final long serialVersionUID = -8018858243959106780L;
	
	/**
	 * Name of the Player
	 */
	private String name;
	
	/**
	 * Skill points for Pilot, Fighter, Trader, and Engineer
	 */
	private int pilot, fighter, trader, engineer;
	
	/**
	 * Current cumulated point
	 */
	private int point;
	//private Skill_construct skills;
	
	/** for THREE **/
	private static final int THREE = 3;

	/** for FIVE **/
	private static final int FIVE = 5;
	
	/**
	 * Getter for the name
	 * @return name
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * Setter for the name
	 * 
	 * @param name name
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * Getter for the pilot
	 * 
	 * @return pilot
	 */
	public int getPilot() {
		return pilot;
	}
	
	/**
	 * Setter for the pilot
	 * @param pilot pilot
	 */
	public void setPilot(int pilot) {
		this.pilot = pilot;
	}
	
	/**
	 * Getter for the fighter
	 * 
	 * @return fighter
	 */
	public int getFighter() {
		return fighter;
	}
	
	/**
	 * Setter for the fighter
	 * 
	 * @param fighter fighter
	 */
	public void setFighter(int fighter) {
		this.fighter = fighter;
	}
	
	/**
	 * Getter for the trader
	 * 
	 * @return trader
	 */
	public int getTrader() {
		return trader;
	}
	
	/**
	 * Setter for the trader
	 * 
	 * @param trader trader
	 */
	public void setTrader(int trader) {
		this.trader = trader;
	}
	
	/**
	 * Getter for the engineer
	 * 
	 * @return engineer
	 */
	public int getEngineer() {
		return engineer;
	}
	
	/**
	 * Setter for the engineer
	 * 
	 * @param engineer engineer
	 */
	public void setEngineer(int engineer) {
		this.engineer = engineer;
	}
	
	/**
	 * to get the number how many time "turn" is pushed
	 * to set the point
	 */
	public void addPoint() {
		this.point += 1;
	}
	
	/**
	 * to get the point
	 * @return point
	 */
	public int getPoint() {
		return point;
	}
	
	/**
	 * to get the basic_power
	 * @return p
	 */
	public double b_Power() {
		final double total_power = (getEngineer() / FIVE + getFighter()
				+ getPilot() / THREE + getTrader() / FIVE);
		return total_power;
	}
	
	/** 
	 * This is a tostring method.
	 * @return tostring.
	 */
	@Override
	public String toString() {
		return super.toString();
	}
}